package com.personal.controller;

import com.personal.entity.User;
import com.personal.service.BorrowingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author huangliuyong
 * @Description:
 * @date 2025/7/10
 **/
@Slf4j
@RestController
@RequestMapping("/borrowing")
public class BorrowingController {
    @Autowired
    private BorrowingService borrowingService;

    @RequestMapping(method = RequestMethod.GET,value = "/user")
    public ResponseEntity<List<User>> getAllUser(){
      return ResponseEntity.ok(borrowingService.getAllUser());
    }
}
